@echo off
chcp 65001 >nul
cd /d "%~dp0"

echo ============================================================
echo Git 仓库初始化脚本
echo ============================================================

echo.
echo [1/7] 初始化 Git 仓库...
git init

echo.
echo [2/7] 添加所有文件...
git add .

echo.
set /p commit_msg="请输入提交说明（直接回车使用默认）: "
if "%commit_msg%"=="" set commit_msg=首次提交：网页整页截图工具 - 支持滚动长截图和登录状态保存

echo.
echo [3/7] 创建首次提交: %commit_msg%
git commit -m "%commit_msg%"

echo.
echo [4/7] 添加远程仓库...
git remote add origin https://gitee.com/baiyumei/screenshot-software.git

echo.
echo [5/7] 设置主分支名称...
git branch -M master

echo.
echo [6/7] 推送到 Gitee...
git push -u origin master

echo.
echo ============================================================
echo ✓ 完成！代码已推送到 Gitee
echo 仓库地址: https://gitee.com/baiyumei/screenshot-software
echo ============================================================

pause

